﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Tabellen.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Tabellen</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <asp:DropDownList ID="DropDownList1" 
            DataTextField="Name"
            DataValueField="Id"
            runat="server"></asp:DropDownList>

            <asp:Button ID="OK" runat="server" Text="OK" OnClick="OK_Click"/>


        <asp:GridView ID="GridView1" runat="server"
            DataKeyNames="Id"
            OnRowDeleting="GridView1_RowDeleting"
            AutoGenerateDeleteButton="True"
            AutoGenerateEditButton="true"
            OnRowEditing="GridView1_RowEditing"
            OnRowUpdating="GridView1_RowUpdating"
            OnRowCancelingEdit="GridView1_RowCancelingEdit"
            >

        </asp:GridView>

        <hr />

        <asp:GridView ID="Grid2" runat="server" AutoGenerateColumns="false" ItemType="Tabellen.Person"
            OnRowEditing="GridView2_RowEditing"
            OnRowUpdating="GridView2_RowUpdating"
            OnRowCancelingEdit="GridView1_RowCancelingEdit"
            DataKeyNames ="Id"
            >
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="Id"/>
                <asp:TemplateField>
                    <ItemTemplate><%#:Item.Name %></ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="Auswahl" runat="server"/>
                    </EditItemTemplate>
                </asp:TemplateField>

            </Columns>


        </asp:GridView>

    
    </div>
    </form>
</body>
</html>
